package com.yungu.swift.admin.route.marketing;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.system.marketing.model.dto.MarketingCouponDto;
import com.yungu.swift.system.marketing.service.MarketingCouponService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author : cuixiuyin
 * @date : 2019/8/2
 */
@RestController
@RequestMapping("/admin/v1/marketing/coupon")
@Api(value = "【营销管理】", tags = "优惠券")
public class CouponAdmin {

    @Reference
    private MarketingCouponService marketingCouponService;

    @RequestMapping(value = "/listByGiftUuid", method = RequestMethod.GET)
    @ApiOperation(value = "获得礼包中的优惠券信息", httpMethod = "GET")
    public ResponseData<List<MarketingCouponDto>> listByGiftUuid(@RequestParam String giftUuid) {
        return marketingCouponService.listByGiftUuid(giftUuid);
    }
}
